﻿<Window x:Class="_7zipWrapper.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="7zip Wrapper" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="350" d:DesignWidth="525" SizeToContent="WidthAndHeight" MinHeight="460" MinWidth="600" Closing="Window_Closing" Icon="/7zipWrapper;component/Images/compress.png">
    <DockPanel LastChildFill="True">
        <StatusBar Height="32" Name="stateStatusBar"  DockPanel.Dock="Bottom">
            <Label Name="statusLabel" Width="Auto" Content="Ready" />
        </StatusBar>
        <Grid Margin="4" Name="mainGrid">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="141" />
                <ColumnDefinition Width="291*" />
                <ColumnDefinition Width="116" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30" />
                <RowDefinition Height="30*" />
            </Grid.RowDefinitions>
            
            <Label Grid.Column="0" Grid.Row="0" Content="7zip Location" Name="label0"  Margin="2"  />
            <Label Grid.Column="0" Grid.Row="1" Content="Input Directory" Name="label1"  Margin="2"  />
            <Label Grid.Column="0" Grid.Row="2"  Content="Output Directory" Margin="2" />
            <Label Grid.Column="0" Grid.Row="3"  Content="Output Filename" Margin="2"  />
            <Label Grid.Column="0" Grid.Row="4"  Content="Excluded File Extensions" Margin="2"  />
            <Label Grid.Column="0" Grid.Row="8"  Content="Low Compression Level" Margin="2"  />
            <Label Grid.Column="0" Grid.Row="9"  Content="High Compression Level" Margin="2"  />
            <Label Grid.Column="0" Grid.Row="10"  Content="Other Options" Margin="2"  />

            <TextBox Grid.Column="1" Grid.Row="0" Name="sevenZipLocationTextBox" Margin="2" />
            <TextBox Grid.Column="1" Grid.Row="1" Name="inputDirectoryTextBox" Margin="2" TextChanged="inputDirectoryTextBox_TextChanged" />
            <TextBox Grid.Column="1" Grid.Row="2" Name="outputDirectoryTextBox" Margin="2" />
            <TextBox Grid.Column="1" Grid.Row="3" Name="outputFileNameTextBox" Text="compressed.7z"  Margin="2" />
            <Border x:Name="b" Grid.Column="1" Margin="2"/><!-- this border element is used to keep the size of the extensions textbox from growing infinitely, yet allowing for a wrap.. is a workaround for the bad design of the wrap functionality on textbox -->
            <TextBox Grid.Column="1" Grid.Row="4" Name="excludedFileExtensionsTextBox" Margin="2" Width="{Binding ActualWidth, ElementName=b}" Grid.RowSpan="4" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" />
            <Slider Grid.Column="1" Grid.Row="8" Name="lowCompressionLevelSlider"  Margin="2" Value="0" Minimum="0" Maximum="9" SmallChange="1" LargeChange="3" IsSnapToTickEnabled="True"/>
            <Slider Grid.Column="1" Grid.Row="9" Name="highCompressionLevelSlider"  Margin="2" Value="5" Minimum="0" Maximum="9" SmallChange="1" LargeChange="3" IsSnapToTickEnabled="True"/>
            <TextBox Grid.Column="1" Grid.Row="10" Grid.RowSpan="3" Name="otherOptionsTextBox" Margin="2" />

            <Button Grid.Column="2" Grid.Row="0" Content="Change" Name="sevenZipLocationButton"  Margin="2" Click="sevenZipLocationButton_Click" />
            <Button Grid.Column="2" Grid.Row="1" Content="Change" Name="inputDirectoryButton"  Margin="2" Click="inputDirectoryButton_Click" />
            <Button Grid.Column="2" Grid.Row="2" Content="Change" Name="outputDirectoryButton"  Margin="2" Click="outputDirectoryButton_Click" />
            <Button Grid.Column="2" Grid.Row="4" Content="Select" Name="selectExcludedExtentionsButton"  Margin="2" Click="selectExcludedExtentionsButton_Click" />
            <Label Grid.Column="2" Grid.Row="8" Name="lowCompressionLevelValueLabel" Margin="2" Content="{Binding ElementName=lowCompressionLevelSlider, Path=Value}" />
            <Label Grid.Column="2" Grid.Row="9" Name="highCompressionLevelValueLabel" Margin="2" Content="{Binding ElementName=highCompressionLevelSlider, Path=Value}" />
            <Button Grid.Column="2" Grid.Row="11" Content="Preview" Name="previewButton"  Margin="2" Click="previewButton_Click" Visibility="Hidden" />
            <Button Grid.Column="2" Grid.Row="10" Content="Compress" Name="compressButton" Height="26"  Margin="2" Click="compressButton_Click" />
            
        </Grid>
    </DockPanel>
</Window>
